<template>
	<view class="bg-gray">
		<view class="width">
			<view class="item" v-for="(item,index) in list" :key='index' @click="jump('/pages/food/applydetail')">
				<view class="flex-row-between">
					<view class="flex-row-start">
						<image src="https://www.haopengsong.xyz/static/food/time.png" class="time"></image>
						申请时间&nbsp;&nbsp;{{item.appTime}}
					</view>
					<view class="chuili font12">待处理</view>
				</view>
				<view class="font color9">
					{{item.appDesc}}
				</view>
			</view>
			<view class="nodata">
				<u-empty text="暂无数据" mode="list" v-if='list.length == 0'></u-empty>
			</view>
			<u-button type="primary" shape='circle' class="apply"  @click="jump('/pages/food/applayspecialmeals')">发起申请</u-button>
		</view>
	</view>
</template>

<script>
import tpl_banner from "@/pages/tabbar/roperty/template/tpl_banner"; //导航栏模块
import storage from "@/utils/storage.js"; //缓存
import { getRecord,appSpecialMeals } from "@/api/food";
export default {
	data() {
		return {
			list:[]
		};
	},
	components: {
		
	},
	/**
	 * 页面加载
	 */
	onLoad(options) {
		
	},
	/**
	 * 页面显示
	 */
	onShow() {
		this.getRecordFun()
	},
	/**
	 * 触底事件
	 */
	onReachBottom() {
		
	},
	/**
	 * 下拉刷新
	 */
	onPullDownRefresh() {
		
	},
	/**
	 * 页面滚动
	 * @param {Object} e
	 */
	onPageScroll(e) {
		
	},
	mounted() {
		
	},
	methods: {
		jump(res){
			uni.navigateTo({
				url: res
			});
		},
		getRecordFun(){
			getRecord().then(res=>{
				this.list = res
			})
		}
	}
};
</script>

<style scoped lang="scss">
	.apply{
		margin-top:25px;
	}
	.item{
		padding: 12px;
		border-radius: 12px;
		margin-bottom: 30px;
		background-color: #fff;
		.time{
			width: 16px;
			height: 16px;
			margin-right: 10px;
		}
		.chuili{
			width: 52px;
			height: 24px;
			text-align: center;
			line-height: 24px;
			border-radius: 3px;
			background-color: #FCEBD8;
			color: #FF9100;
		}
		.font{
			padding-top: 10px;
			border-top: 1px solid #dddddd60;
			margin-top: 10px;
			line-height: 24px;
		}
	}
	.nodata{
		margin-top: 60px;
	}
</style>